//
//  ViewController.m
//  12-Homework
//
//  Created by dllo on 16/7/29.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
@property (weak, nonatomic) IBOutlet UISlider *songSlider;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIGraphicsBeginImageContextWithOptions(_coverImageView.bounds.size, NO, 1.0);
    [[UIBezierPath bezierPathWithRoundedRect:_coverImageView.bounds cornerRadius:_coverImageView.frame.size.width] addClip];
    [_coverImageView drawRect:_coverImageView.bounds];
    _coverImageView.image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    [_songSlider setMinimumTrackImage:[UIImage imageNamed:@"player_slider_playback_left"] forState:UIControlStateNormal];
    [_songSlider setMaximumTrackImage:[UIImage imageNamed:@"player_slider_playback_right"] forState:UIControlStateNormal];
    [_songSlider setThumbImage:[UIImage imageNamed:@"player_slider_playback_thumb"] forState:UIControlStateNormal];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
